package com.example.dziennikposilkow;

import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class PozostaleProdukty extends DziennikMainActivity {
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        setContentView(R.layout.activity_pozostale_produkty);
        
        final Button button_chipsy = (Button) findViewById(R.id.buttonChipsy);
 		button_chipsy.setOnClickListener(new View.OnClickListener() {
 			public void onClick(View v) {

 				String str = "Chipsy"; //Data you want to send        
 				Intent intent = new Intent(PozostaleProdukty.this, TabelaProdukty.class);
 				intent.putExtra("name",str); //here you will add the data into intent to pass bw activites
 				v.getContext().startActivity(intent);
 				
 			}
 			
 		});
 		
 		 final Button button_mcdonalds = (Button) findViewById(R.id.buttonMCdonalds);
  		button_mcdonalds.setOnClickListener(new View.OnClickListener() {
  			public void onClick(View v) {

  				String str = "MCdonalds"; //Data you want to send        
  				Intent intent = new Intent(PozostaleProdukty.this, TabelaProdukty.class);
  				intent.putExtra("name",str); //here you will add the data into intent to pass bw activites
  				v.getContext().startActivity(intent);
  				
  			}
  			
  		});
  		

		 final Button button_inne = (Button) findViewById(R.id.buttonInne);
 		button_inne.setOnClickListener(new View.OnClickListener() {
 			public void onClick(View v) {

 				String str = "InnePP"; //Data you want to send        
 				Intent intent = new Intent(PozostaleProdukty.this, TabelaProdukty.class);
 				intent.putExtra("name",str); //here you will add the data into intent to pass bw activites
 				v.getContext().startActivity(intent);
 				
 			}
 			
 		});
 		
  		
 		
	}
}
